package com.orange.off.cloud.cloudoff.adapters;

import android.content.Context;
import android.widget.TextView;

import com.orange.off.cloud.cloudoff.R;
import com.orange.off.cloud.cloudoff.base.ListBaseAdapter;
import com.orange.off.cloud.cloudoff.base.SuperViewHolder;
import com.orange.off.cloud.cloudoff.model.PersonalMessageListBean;

/**
 * 个人中心---我的通知adapter
 *
 * @author qs
 */
public class NoticeAdapter extends ListBaseAdapter<PersonalMessageListBean> {

	public NoticeAdapter(Context context){
		super(context);
	}

	@Override
	public int getLayoutId() {
		return R.layout.mynotice_item;
	}
	@Override
	public void onBindItemHolder(SuperViewHolder holder, int position) {
		ViewHolder viewHolder = new ViewHolder();
		PersonalMessageListBean item = mDataList.get(position);

		viewHolder.tv_noticeTitle=holder.getView(R.id.tv_noticeTitle);
		viewHolder.tv_noticeTime=holder.getView(R.id.tv_noticeTime);
		viewHolder.tv_noticeTitle.setText(item.zhuti);
		viewHolder.tv_noticeTime.setText(item.ftime);
	}


//	@Override
	//	public View getView(int position, View convertView, ViewGroup parent) {
	//		ViewHodler hodler;
	//		if (convertView==null) {
	//			hodler=new ViewHodler();
	//			LayoutInflater inflater=LayoutInflater.from(context);
	//			convertView=inflater.inflate(R.layout.mynotice_item,null);
	//			hodler.tv_noticeTitle=(TextView) convertView.findViewById(R.id.tv_noticeTitle);
	//			hodler.tv_noticeTime=(TextView) convertView.findViewById(R.id.tv_noticeTime);
	//			hodler.tv_noticeContent=(TextView) convertView.findViewById(R.id.tv_noticeContent);
	//
	//			convertView.setTag(hodler);
	//		}else{
	//			hodler=(ViewHodler) convertView.getTag();
	//		}
	//
	//
	//		return convertView;
	//	}
	
	class ViewHolder{
		TextView tv_noticeTitle,tv_noticeTime;
	}

}
